// 测试程序功能
console.log("测试采空区地质封存选址打分程序");

// 测试指标数量
const indicators = require('./script.js').indicators;
console.log(`指标总数: ${indicators.length}`);

// 验证总分计算逻辑
function testScoreCalculation() {
    const testScores = [80, 70, 90, 85, 75, 65, 95, 88, 72, 68, 82, 78, 92, 84, 76, 66, 89, 73];
    const weight = 100 / testScores.length;
    const totalScore = testScores.reduce((sum, score) => sum + score * (weight / 100), 0);
    
    console.log(`测试总分: ${totalScore.toFixed(2)}`);
    console.log(`每个指标权重: ${weight.toFixed(2)}%`);
}

testScoreCalculation();

// 验证得分计算规则
function testScoringRules() {
    console.log("\n得分规则验证:");
    console.log("适宜等级: 80-100分随机 (开区间)");
    console.log("一般等级(文字): 60-80分随机 (闭区间)");
    console.log("一般等级(数字): 按区间比例计算");
    console.log("不适宜等级: 40-60分随机 (开区间)");
}

testScoringRules();

console.log("\n程序功能验证完成。请访问 http://localhost:3000 进行实际测试。");